﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.DataAccess.SQLDom;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.DataAccess.SPI
{
    public interface IQueryService<T> : IDataAccessAtion where T : class
    {
        /// <summary>
        /// 查询指定的数据
        /// </summary>
        /// <param name="metaData">元数据</param>
        /// <param name="dataId">数据唯一标识</param>
        /// <returns>通用结果对象</returns>
        TResult QueryData(T metaData, string dataId, Dictionary<string, object> exrParams = null);

        /// <summary>
        /// 综合查询数据
        /// </summary>        
        /// <param name="metaData">元数据</param>        
        /// <param name="queryFilter">查询条件</param>        
        /// <returns>通用结果对象</returns>
        TResult QueryData(T metaData, QueryFilter queryFilter, Dictionary<string, object> exrParams = null);

        /// <summary>
        /// 获取对象数据
        /// </summary>            
        /// <param name="metaData">元数据</param>
        /// <param name="childNodeId">节点ID</param>
        /// <param name="dataId">数据唯一标识</param>        
        /// <returns>通用结果对象</returns>
        TResult QueryData(T metaData, string childNodeId, string dataId, Dictionary<string, object> exrParams = null);

        /// <summary>
        /// 获取对象数据
        /// </summary>        
        /// <param name="metaData">元数据</param>
        /// <param name="childNodeId">节点ID</param>
        /// <param name="queryFilter">查询条件</param>
        /// <returns>通用结果对象</returns>
        TResult QueryData(T metaData, string childNodeId, QueryFilter queryFilter, Dictionary<string, object> exrParams = null);
    }
}
